package day7;

/**
 * @author oldliu
 * @since 1.0
 */
public class Student {
    private String name;
    private String qq;
    private String tele;
    private int age;
    public Student(String name){
        this.name=name;
    }
    private Student(String name, String qq, String tele,int age) {
        this.name = name;
        this.qq = qq;
        this.tele = tele;
        this.age=age;
    }

    private  boolean changeAge(int newAge){
        if(newAge>10&&newAge<40)
        {
            this.age=newAge;
            return true;
        }
        return false;

    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getTele() {
        return tele;
    }

    public void setTele(String tele) {
        this.tele = tele;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", qq='" + qq + '\'' +
                ", tele='" + tele + '\'' +
                ", age='" + age + '\'' +
                '}';
    }
}
